package org.example.rtc.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.rtc.mapper.PatInfoMapper;
import org.example.rtc.mapper.UserMapper;
import org.example.rtc.model.entity.PatInfo;
import org.example.rtc.model.entity.User;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.List;

@Service
public class UserService extends ServiceImpl<UserMapper, User> {

    public User getUserByUsername(String username) {
        List<User> list = list();
        if (CollectionUtils.isEmpty(list)) {
            return null;
        }
        return list.get(0);
    }

}
